#include "list.h"

#ifndef _QUEUE_H_
#define _QUEUE_H_

template <typename T>
class Queue : public List<T> {
   public:
    void enqueue(T const& e);
    T dequeue();
    T& front();
};

template <typename T>
void Queue<T>::enqueue(T const& e) {
    this->insertAsLast(e);
    return;
}

template <typename T>
T Queue<T>::dequeue() {
    return remove(this->first());
}

template <typename T>
T& Queue<T>::front() {
    return this->first()->data;
}

#endif